/*******************************************************************************
Paper title: Does early nutrition predict cognitive skills during later childhood?
Evidence from two developing countries
Alan Sanchez, Marta Favara, Margaret Sheridan, Jere Behrman.
Created: 8 OCt 2020
This version: 4 Dec 2023 
Content: Table 1	
*******************************************************************************/
		
clear all
local user Alan
		
if "`user'"=="Alan" {
global outdata	C:\Users\alans\Dropbox\_NIHR21_Proposal\NIH Papers\Paper 1_nutrition&EF\paper\WD\Replication files\Data
global output   C:\Users\alans\Dropbox\_NIHR21_Proposal\NIH Papers\Paper 1_nutrition&EF\paper\WD\Replication files\Output
}

**************************************
*** TABLE 1, Column 1
**************************************

use "$outdata\et_ef_controls.dta", clear

drop if sibling==1

gen urban_r1=.
replace urban_r1=1 if typesite_r1==1
replace urban_r1=0 if typesite_r1==2

***Constraining the sample to those interviewed in Round 4 + balanced
qui reg wi_r4 stunting_r1 stunting_r2 zhfa_r1 zhfa_r2 urban_r1 momedu wi_r1 
gen sample=e(sample)
keep if sample==1

tab m_educ 
sum urban_r1 wi_r1 stunting_r1 zhfa_r1 stunting_r2 zhfa_r2

**************************************
*** TABLE 1, Column 2
**************************************
use "$outdata\pe_ef_controls.dta", clear

drop if sibling==1
gen urban_r1=.
replace urban_r1=1 if typesite_r1==1
replace urban_r1=0 if typesite_r1==2

***Constraining the sample to those interviewed in Round 4 + balanced
qui reg wi_r4 stunting_r1 stunting_r2 zhfa_r1 zhfa_r2 urban_r1 momedu wi_r1
gen sample=e(sample)
keep if sample==1

tab m_educ 
sum urban_r1 wi_r1 stunting_r1 zhfa_r1 stunting_r2 zhfa_r2



